Skip to content

fix(pipeline): scope canonical nodes to configured repos, group fallback for others#1189

Merged
krusche merged 1 commit into
stagingfrom
feature/pipeline-repo-scoped-fallback
Jul 6, 2026
Merged

fix(pipeline): scope canonical nodes to configured repos, group fallback for others#1189
krusche merged 1 commit into
stagingfrom
feature/pipeline-repo-scoped-fallback

Conversation

@krusche

@krusche krusche commented Jul 6, 2026

Copy link
Copy Markdown
Member

Why

The canonical Build/Tests/Quality catalog (#1187) is global and Artemis-shaped. Helios is multi-tenant (staging tracks ls1intum/Artemis and ls1intum/Helios), so any repo whose CI job names don't match — e.g. Helios's own Linting Server (Java), server-tests, Validate OpenAPI Spec — would show all 7 nodes stuck PENDING and lose its previous workflow-group view. This is Option A: stop that regression before the prod release.

What

  • Add helios.pipeline.repositories (nameWithOwner allow-list; default [ls1intum/Artemis]). Only listed repos render the canonical catalog.
  • Every other repository falls back to its WorkflowGroup-based pipeline — groups as categories, workflow runs as nodes, plus the "Ungrouped" bucket — built into the same PipelineDto, so the client is unchanged.
  • No repository context → empty pipeline (no cross-repo leak).

The API contract and client are unchanged; this is server-internal routing + one config key.

Tests

PipelineIT: canonical repo aggregates jobs into Build/Tests/Quality; non-canonical repo falls back to its runs (not the catalog); no-context → empty. Full pipeline + context-boot suite green.

Follow-up

The longer-term design (default Build→Test→Quality for all repos with per-repo DB config + auto-detection) is planned separately; this PR is the interim non-regression fix.

🤖 Generated with Claude Code

…ack for others

The canonical Build/Tests/Quality catalog is Artemis-shaped and global, so other
repos (e.g. ls1intum/Helios) showed an all-pending skeleton and lost their
workflow-group view. Gate the canonical catalog to helios.pipeline.repositories
(default: ls1intum/Artemis); every other repository falls back to its
WorkflowGroup-based pipeline (built into the same PipelineDto), preserving prior
behaviour. No repo context -> empty pipeline.

Guarded by PipelineIT (canonical repo, non-canonical fallback, no-context empty).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@krusche krusche requested a review from a team as a code owner July 6, 2026 12:59
Copilot AI review requested due to automatic review settings July 6, 2026 12:59
@codacy-production

codacy-production Bot commented Jul 6, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 18 complexity

Metric Results
Complexity 18 (≤ 20 complexity)

View in Codacy

🟢 Coverage 75.47% diff coverage · +0.10% coverage variation

Metric Results
Coverage variation +0.10% coverage variation (-1.00%)
Diff coverage 75.47% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (db66dc8) 15605 8263 52.95%
Head commit (32a5daa) 15656 (+51) 8305 (+42) 53.05% (+0.10%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1189) 53 40 75.47%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents non-Artemis repositories from being forced into the global “canonical” Build/Tests/Quality pipeline skeleton by scoping that catalog to an allow-list of repositories, and falling back to the previous workflow-group/run-based pipeline for all other repos.

Changes:

  • Added helios.pipeline.repositories (nameWithOwner allow-list) to decide whether a repository renders the canonical node catalog.
  • Updated PipelineService to route between canonical node aggregation and a workflow-group/run fallback pipeline for non-canonical repositories.
  • Extended PipelineIT to cover canonical, non-canonical fallback, and no-repository-context behaviors; updated default config accordingly.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
server/application-server/src/main/java/de/tum/cit/aet/helios/workflow/pipeline/PipelineService.java Routes pipeline building between canonical aggregation and workflow-group/run fallback based on repo allow-list.
server/application-server/src/main/java/de/tum/cit/aet/helios/workflow/pipeline/PipelineProperties.java Adds repositories allow-list to the pipeline configuration properties.
server/application-server/src/main/resources/application.yml Introduces default helios.pipeline.repositories: ["ls1intum/Artemis"].
server/application-server/src/test/java/de/tum/cit/aet/helios/workflow/pipeline/PipelineIT.java Updates integration test coverage for canonical vs fallback behavior and empty pipeline without repo context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 63 to 65
public PipelineDto getPipelineForBranch(String branchName) {
return build(workflowRunService.getLatestWorkflowRunsByBranchAndHeadCommitSha(branchName));
return buildFor(workflowRunService.getLatestWorkflowRunsByBranchAndHeadCommitSha(branchName));
}
Comment on lines 67 to 70
public PipelineDto getPipelineForPullRequest(Long pullRequestId) {
return build(
return buildFor(
workflowRunService.getLatestWorkflowRunsByPullRequestIdAndHeadCommit(pullRequestId));
}
Comment on lines 19 to 21
@ConfigurationProperties(prefix = "helios.pipeline")
public record PipelineProperties(List<Category> categories) {
public record PipelineProperties(List<String> repositories, List<Category> categories) {

@krusche krusche merged commit 3f90218 into staging Jul 6, 2026
24 checks passed
@krusche krusche deleted the feature/pipeline-repo-scoped-fallback branch July 6, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants